package com.plian.system.wrapper.im;

import com.plian.system.dto.im.InvestmentPlanRecordDTO;
import com.plian.system.entity.im.InvestmentPlanRecord;
import com.plian.system.mybatis.support.BaseWrapper;
import com.plian.system.vo.im.InvestmentPlanRecordVO;
import com.plian.system.wrapper.util.CacheWrapperUtil;
import com.plian.system.wrapper.util.WrapperUtil;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import static com.plian.system.wrapper.util.WrapperConstant.ORG_ID_TO_NAME;
import static com.plian.system.wrapper.util.WrapperConstant.SPRING;

@Mapper(componentModel = SPRING, uses = {CacheWrapperUtil.class, WrapperUtil.class})
public interface InvestmentPlanRecordWrapper extends BaseWrapper<InvestmentPlanRecord, InvestmentPlanRecordDTO, InvestmentPlanRecordVO> {

    @Override
    @Mappings(value = {
            @Mapping(source = "orgId", target = "orgName", qualifiedByName = ORG_ID_TO_NAME),

    })
    InvestmentPlanRecordVO entityToVO(InvestmentPlanRecord entity);
}
